package com.imooc.files.service;

import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 *
 * @auther Levi
 * @Date: 2021/03/17/22:01
 * @Description:
 */
public interface UploaderService {
    /**
     * 使用FastDFS上传
     * @param file
     * @param fileExtName
     * @return
     * @throws IOException
     */
    String uploadFdfs(MultipartFile file, String fileExtName) throws IOException;

    /**
     * 使用阿里的OSS上传
     * @param file
     * @param userId
     * @param fileExtName
     * @return
     * @throws Exception
     */
    String uploadOss(MultipartFile file, String userId,
                     String fileExtName) throws Exception;
}
